using System;
using System.Collections.Generic;
using System.Text;
using Hoshimi._TSP_;
using System.Drawing;

namespace Hoshimi._Map_._TSP_.MyTSP.AI
{
	public class PointCity : City
	{
		#region Variables
	
		protected Cluster mCluster				= null;
		protected static bool mReverseDistance	= false;

		#endregion

		#region Getters & Setters

		public Cluster Cluster { get { return this.mCluster; } }
		public static bool ReverseDistance
		{
			get { return mReverseDistance; }
			set {mReverseDistance = value; }
		}

		#endregion

		#region Methods

		public override int Distance(City city)
		{
			if(mReverseDistance)
			{
				return this.mCluster.GetCost(city.mLocation, this.mLocation);
			}

			return this.mCluster.GetCost(this.mLocation, city.mLocation);
		}

		#endregion

		#region Ctor

		public PointCity(Cluster cluster, Point location)
			: base()
		{
			this.mCluster	= cluster;
			this.mLocation	= location;
		}

		#endregion
	}
}
